package com.czk.assigneeuel;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.ProcessInstance;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author ChenZhangKun
 * @Date 2020/9/11 9:59
 */
public class AssigneeUel {
    public static void main(String[] args) {
        //
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        //
        RuntimeService runtimeService = processEngine.getRuntimeService();
        // 设置assignee的值
        Map<String,Object> map=new HashMap<>();
        map.put("assignee1","底宏桦");
        map.put("assignee2","杨雄");
        map.put("assignee3","陈彰坤");
        // 启动流程
        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("commit", map);
        // 输出流程信息
        System.out.println(processInstance.getName());

    }
}
